<div class="col-12" >
    <div class="card">
        <div class="card-header">
            <h3 class="card-title">{{.label}}</h3>

            <div class="card-tools">
                <div class="input-group input-group-sm" style="width: 350px;">
                    <a  class="btn btn-success btn-sm"  data-toggle="modal" data-target="#addModal" title="添加">
                        <i class="fa fa-plus "></i>
                    </a>
                    <a  class="btn btn-info btn-sm" id="asset-sync" title="同步">
                        <i class="fa fa-refresh" aria-hidden="true"></i>
                    </a>
                    <input id="search-key" type="text" name="table_search" class="form-control float-right" placeholder="Search" value="{{ .key }}">
                    <div class="input-group-append">
                        <a type="submit" class="btn btn-default" id="search-a">
                            <i class="fa fa-search" style="color: grey"></i>
                        </a>
                    </div>
                </div>
            </div>
        </div>
        <!-- /.card-header -->
        <div class="card-body table-responsive p-0">
            <table class="table table-hover text-nowrap ">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>主机名</th>
                    <th>公网IP</th>
                    <th>内网IP</th>
                    <th>标签</th>
                    <th>IDC</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {{ range  .data_list }}
                    <tr>
                        <td>{{ .ID }}</td>
                        <td>{{ .HostName }}</td>
                        <td>{{ .Ip }}</td>
                        <td>{{ .InnerIp}}</td>
                        <td>{{ .Label.LabelName }}</td>
                        <td>{{ .Idc.IdcName }}</td>
                        <td>
                            {{ if .Status }}
                                <a href="javascript:;" style="text-decoration:none; color: #00a65a" data-toggle="tooltip" data-placement="top" title="" name="con-asset" con_id="{{ .ID }}" data-original-title="可连接"><span class="fa fa-lg fa-power-off"></span> {{ .Status }} </a>
                            {{ else }}
                                <a href="javascript:;" style="text-decoration:none; color: #dc3545" data-toggle="tooltip" data-placement="top" title="" name="con-asset" con_id="{{ .ID }}" data-original-title="连接异常"><span class="fa fa-lg fa-power-off"></span> {{ .Status }} </a>
                            {{ end }}
                        </td>
                        <td style="padding-left:5px;">
                            <a class="btn btn-xs btn-info" href="javascript:;" name="edit-asset" edit_id="{{ .ID }}" style="text-decoration:none;"  title="修改"><span class="fa fa-pencil"></span></a>
                            <a class="btn btn-xs btn-success" href="javascript:;" name="info-asset" info_id="{{ .ID }}"  style="text-decoration:none;"  title="详情信息"><span class="fa fa-info-circle"></span> </a>
                            <a class="btn btn-xs btn-warning" href="javascript:;" name="add-zabbix" zbx_id="{{ .ID }}" style="text-decoration:none;"  title="zabbix"><span class="fa fa-bar-chart"></span></a>
                            <a class="btn btn-xs btn-danger" href="javascript:;" name="del-asset" del_id="{{ .ID }}" style="text-decoration:none;"  title="删除"><span class="fa fa-trash"></span></a>
                            <a class="btn btn-xs btn-primary" href="/ws/{{.ID}}/" target="_blank"  style="text-decoration:none;"  title="webssh"><span class="fa fa-desktop"></span></a>
                        </td>
                    </tr>

                {{end}}

                </tbody>
            </table>
        </div>
        <!-- /.card-body -->
        <div class="card-footer clearfix">
            <ul class="pagination pull-right" style="margin-right: 50px">
                {{if eq $.page.CurPage 1 }}
                    <li class="page-item disabled"><a class="page-link" href="/log/user/1/">首页</a></li>
                    <li class="page-item disabled"><a class="page-link disabled" href="/log/user/{{ Sub $.page.CurPage 1 }}/">上一页</a></li>
                {{ else }}
                    <li class="page-item"><a class="page-link" href="/log/user/1/">首页</a></li>
                    <li class="page-item"><a class="page-link" href="/log/user/{{ Sub $.page.CurPage 1 }}/">上一页</a></li>
                {{ end }}
                </li>

                {{range $k,$v:=.page.Nums}}
                    <li class="page-item"><a class="page-link {{if eq $v $.page.CurPage}}active{{end}}" href="/log/user/{{$v}}/">{{ $v }}</a></li>
                    </li>
                {{end}}

                {{if eq $.page.CurPage .page.PageCount }}
                    <li class="page-item disabled"><a class="page-link" href="/log/user/{{ Add $.page.CurPage 1 }}/">下一页</a></li>
                    <li class="page-item disabled"><a class="page-link" href="/log/user/{{.page.PageCount }}/">尾页</a></li>
                {{ else }}
                    <li class="page-item"><a class="page-link" href="/log/user/{{ Add $.page.CurPage 1 }}/">下一页</a></li>
                    <li class="page-item"><a class="page-link" href="/log/user/{{.page.PageCount }}/">尾页</a></li>
                {{ end }}
            </ul>
        </div>
    </div>
    <!-- /.card -->
</div>

<!--模态框-->
<!--添加-->
<div class="modal fade" id="addModal" tabindex="-1" role="dialog" aria-labelledby="addModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header color-back">
                <h6 class="modal-title pull-left" id="addModalLabel">添加</h6>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="color: white;font-family: -webkit-pictograph;">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">

                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">主机名</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control my-radius" placeholder="PJ-PF-TAG" id="host-name">
                    </div>
                </div>

                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">公网IP</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control my-radius" placeholder="公网IP" id="ip">
                    </div>
                </div>

                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">内网IP</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control my-radius" value="127.0.0.1" id="inner-ip">
                    </div>
                </div>

                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">端口</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control my-radius" value="22" id="port">
                    </div>
                </div>

                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">标签</label>
                    <div class="col-sm-6">
                        <select class="form-control"  id="asset-label">
                            {{ range .label_list }}
                            <option value="{{ .ID }}">{{ .LabelName }}</option>
                            {{ end }}
                        </select>
                    </div>
                </div>
                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">机房</label>
                    <div class="col-sm-6">
                        <select class="form-control" id="asset-idc">
                            {{ range .idc_list }}
                                <option value="{{ .ID }}">{{ .IdcName }}</option>
                            {{ end }}
                        </select>
                    </div>
                </div>
                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">管理用户</label>
                    <div class="col-sm-6">
                        <select class="form-control" id="asset-lguser">
                            {{ range .lguser_list }}
                                <option value="{{ .ID }}">{{ .UserName }}-{{ .Msg }}</option>
                            {{ end }}
                        </select>
                    </div>
                </div>

            </div>

            <div class="modal-footer color-gray">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-info" id="add-sub">提交</button>
            </div>
        </div>
    </div>
</div>
<!--/添加-->

<!--修改-->
<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="editModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header color-back">
                <h6 class="modal-title pull-left" id="editModalLabel">修改</h6>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="color: white;font-family: -webkit-pictograph;">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">主机名</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control my-radius" placeholder="PROJECT-PLATFORM-LABEL" id="edit-host-name">
                    </div>
                </div>
                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">公网IP</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control my-radius" placeholder="公网IP" id="edit-ip">
                    </div>
                </div>
                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">内网IP</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control my-radius" placeholder="127.0.0.1" id="edit-inner-ip">
                    </div>
                </div>

                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">端口</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control my-radius" value="22" id="edit-port">
                    </div>
                </div>

                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">标签</label>
                    <div class="col-sm-6">
                        <select class="form-control" id="auth-method" id="edit-asset-label">
                            {{ range .label_list }}
                                <option value="{{ .ID }}">{{ .LabelName }}</option>
                            {{ end }}
                        </select>
                    </div>
                </div>
                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">机房</label>
                    <div class="col-sm-6">
                        <select class="form-control" id="edit-asset-idc">
                            {{ range .idc_list }}
                                <option value="{{ .ID }}">{{ .IdcName }}</option>
                            {{ end }}
                        </select>
                    </div>
                </div>
                <div class="form-group row">
                    <label  class="col-sm-3 col-form-label text-right">管理用户</label>
                    <div class="col-sm-6">
                        <select class="form-control" id="edit-asset-lguser">
                            {{ range .lguser_list }}
                                <option value="{{ .ID }}">{{ .UserName }}</option>
                            {{ end }}
                        </select>
                    </div>
                </div>

            </div>

            <div class="modal-footer color-gray">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-info" id="edit-sub">提交</button>
            </div>
        </div>
    </div>
</div>
<!--/修改-->



<div class="modal fade" id="infoModal" tabindex="-1" role="dialog" aria-labelledby="infoModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content" style="width: 1280px;margin-left: -300px">
            <div class="modal-header color-back">
                <h6 class="modal-title pull-left" id="infoModalLabel">详情</h6>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="color: white;font-family: -webkit-pictograph;">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="card">
                    <div class="card-header border-transparent">
                        <h3 class="card-title">基本信息</h3>
                        <div class="card-tools">
                            <button type="button" class="btn btn-tool" data-card-widget="collapse">
                                <i class="fa fa-minus"></i>
                            </button>
                            <button type="button" class="btn btn-tool" data-card-widget="remove">
                                <i class="fa fa-times"></i>
                            </button>
                        </div>
                    </div>
                    <!-- /.card-header -->
                    <div class="card-body p-0" style="display: block;">
                        <div id="world-map-markers" class="row" style="height: auto;padding: 20px;">
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>ID</label>
                                <div class="skillbar" id="detail-id">0</div>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>IP</label>
                                <div class="skillbar" id="detail-ip">127.0.0.1</div>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>资产类型</label>
                                <div class="skillbar" id="detail-os-type">Linux</div>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>状态</label>
                                <div class="skillbar" id="detail-status">RUN</div>
                            </div>

                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>标签</label>
                                <div class="skillbar" id="detail-label">test</div>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>机房</label>
                                <div class="skillbar" id="detail-idc">test</div>
                            </div>

                        </div>
                        <!-- /.table-responsive -->
                    </div>
                    <!-- /.card-body -->

                </div>

                <div class="card">
                    <div class="card-header border-transparent">
                        <h3 class="card-title">系统信息</h3>
                        <div class="card-tools">
                            <button type="button" class="btn btn-tool" data-card-widget="collapse">
                                <i class="fa fa-minus"></i>
                            </button>
                            <button type="button" class="btn btn-tool" data-card-widget="remove">
                                <i class="fa fa-times"></i>
                            </button>
                        </div>
                    </div>
                    <!-- /.card-header -->
                    <div class="card-body p-0" style="display: block;">
                        <div class="row" style="height: auto;padding: 20px;">
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>主机名</label>
                                <div class="skillbar" id="detail-hostname">s1</div>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>内网IP</label>
                                <div class="skillbar" id="detail-inner-ip">192.168.1.250</div>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>域名</label>
                                <div class="skillbar" id="detail-host-arp">mirh5a.lieshenhd.com</div>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>产品名称</label>
                                <div class="skillbar" id="detail-product">OpenStack Nova</div>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>管理用户</label>
                                <div class="skillbar" id="detail-lguser">root</div>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>登陆方式</label>
                                <div class="skillbar" id="detail-auth-method">key</div>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>端口</label>
                                <div class="skillbar" id="detail-port">22</div>
                            </div>

                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>系统版本</label>
                                <div class="skillbar" id="detail-os-version">CentOS 6.5</div>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>内核版本</label>
                                <div class="skillbar" id="detail-ker-version">Linux 2.6.32-696.16.1.el6.x86_64</div>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>CPU 型号</label>
                                <div class="skillbar div-overflow" id="detail-cpu">Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz</div>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>CPU 核数</label>
                                <div class="skillbar" id="detail-cpu-count">4</div>
                            </div>

                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>内存容量</label>
                                <div class="skillbar" id="detail-memory">7871</div>
                            </div>

                        </div>
                        <!-- /.table-responsive -->
                    </div>
                    <!-- /.card-body -->

                </div>

                <div class="card">
                    <div class="card-header border-transparent">
                        <h3 class="card-title">网卡信息</h3>
                        <div class="card-tools">
                            <button type="button" class="btn btn-tool" data-card-widget="collapse">
                                <i class="fa fa-minus"></i>
                            </button>
                            <button type="button" class="btn btn-tool" data-card-widget="remove">
                                <i class="fa fa-times"></i>
                            </button>
                        </div>
                    </div>
                    <!-- /.card-header -->
                    <div class="card-body p-0" style="display: block;">
                        <div class="row" style="height: auto;padding: 20px;" id="detail-nic">
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>网卡</label>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>IP</label>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>MAC</label>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>MASK</label>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>MTU</label>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <label>类型</label>
                            </div>

                            <div class="col-sm-2" style="padding-bottom: 5px"><div class="skillbar">lo</div></div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <div class="skillbar">127.0.0.1</div>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <div class="skillbar">00:00:00:00:00:00</div>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <div class="skillbar">255.0.0.0</div>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <div class="skillbar">65536</div>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <div class="skillbar">loopback</div>
                            </div>

                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <div class="skillbar">eth0</div>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <div class="skillbar">192.168.1.250</div>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <div class="skillbar">fa:16:3e:32:c9:cc</div>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <div class="skillbar">255.255.255.0</div>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <div class="skillbar">1500</div>
                            </div>
                            <div class="col-sm-2" style="padding-bottom: 5px">
                                <div class="skillbar">ether</div>
                            </div>

                        </div>
                        <!-- /.table-responsive -->
                    </div>
                    <!-- /.card-body -->

                </div>

                <div class="card">
                    <div class="card-header border-transparent">
                        <h3 class="card-title">分区信息</h3>
                        <div class="card-tools">
                            <button type="button" class="btn btn-tool" data-card-widget="collapse">
                                <i class="fa fa-minus"></i>
                            </button>
                            <button type="button" class="btn btn-tool" data-card-widget="remove">
                                <i class="fa fa-times"></i>
                            </button>
                        </div>
                    </div>
                    <!-- /.card-header -->
                    <div class="card-body p-0" style="display: block;">
                        <div class="row" style="height: auto;padding: 20px;" id="detail-partition">
                            <div class="my-sm-3" style="padding-bottom: 5px">
                                <label>分区</label>
                            </div>
                            <div class="my-sm-3" style="padding-bottom: 5px">
                                <label>挂载</label>
                            </div>
                            <div class="my-sm-3" style="padding-bottom: 5px">
                                <label>类型</label>
                            </div>
                            <div class="my-sm-3" style="padding-bottom: 5px">
                                <label>总大小</label>
                            </div>
                            <div class="my-sm-3" style="padding-bottom: 5px">
                                <label>可用大小</label>
                            </div>

                            <div class="my-sm-3" style="padding-bottom: 5px">

                                <div class="skillbar">/dev/vda2</div>
                            </div>
                            <div class="my-sm-3" style="padding-bottom: 5px">

                                <div class="skillbar">/</div>
                            </div>
                            <div class="my-sm-3" style="padding-bottom: 5px">

                                <div class="skillbar">ext4</div>
                            </div>
                            <div class="my-sm-3" style="padding-bottom: 5px">

                                <div class="skillbar">37912903680 KB</div>
                            </div>
                            <div class="my-sm-3" style="padding-bottom: 5px">

                                <div class="skillbar">30876160000 KB</div>
                            </div>

                            <div class="my-sm-3" style="padding-bottom: 5px">

                                <div class="skillbar">/dev/vdb</div>
                            </div>
                            <div class="my-sm-3" style="padding-bottom: 5px">

                                <div class="skillbar">/data</div>
                            </div>
                            <div class="my-sm-3" style="padding-bottom: 5px">

                                <div class="skillbar">ext4</div>
                            </div>
                            <div class="my-sm-3" style="padding-bottom: 5px">

                                <div class="skillbar">316934193152 KB</div>
                            </div>
                            <div class="my-sm-3" style="padding-bottom: 5px">

                                <div class="skillbar">240535531520 KB</div>
                            </div>

                        </div>
                        <!-- /.table-responsive -->
                    </div>
                    <!-- /.card-body -->

                </div>

            </div>

            <div class="modal-footer color-gray">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>
<!--/模态框-->

